import React, {Component} from 'react';
import propTypes from 'prop-types'
import UserItem from "./userItem.jsx";
import './userList.scss'
class UserList extends Component {

    static propTypes = {
        userList:propTypes.array.isRequired
    }
    render() {
        return (
            <div className={"user-list"}>
                    {this.props.userList.map(user => <UserItem key={user.id} userInfo={user} />)}
            </div>
        );
    }
}

export default UserList;